package com.net.core.models;


import com.net.core.models.bean.User;
import com.net.core.core.YXException;
import com.net.core.models.common.CommonService;
import com.net.core.utils.CurrentCache;

import javax.annotation.Resource;

public class BaseController {

    @Resource
    public CurrentCache currentCache;

    public User getUser() {
        User user = currentCache.getUser();
        if (user == null) throw new YXException("没有登录");
        return user;
    }
}
